const { Controller } = require("uni-cloud-router");
module.exports = class CateController extends Controller {
  add(){
		const { ctx, service } = this;
    return this.service.cate.add(ctx.data);
  }
	edit(){
		const { ctx, service } = this;
		const id=ctx.data.id;
		delete ctx.data.id;
	  return this.service.cate.edit(id,ctx.data);
	}
	getOne(){
		const { ctx, service } = this;
		return this.service.cate.getOne(ctx.data.id);
	}
	list(){
		const { ctx, service } = this;
		return this.service.cate.list(ctx.data);
	}
	delete(){
		const { ctx, service } = this;
		return this.service.cate.list(ctx.data);
	}
};